home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / vidcolor.doc < prev    next >
Text File  |  1987-08-17  |  2KB  |  47 lines

  1.  
  2.  
  3.         NAME
  4.                 vid_border -- set border color
  5.                 vid_palette -- set color palette
  6.  
  7.         SYNOPSIS
  8.                 (void) vid_border(clr);
  9.                 (void) vid_palette(num);
  10.                 int clr;       one of the 16 color values
  11.                 int num;       palette 0 or 1
  12.  
  13.  
  14.         DESCRIPTION
  15.         These two functions manipulate the CGA card, or EGA card in
  16.         CGA color mode.  vid_border() sets the border color outside the
  17.         normal text area to any of the 16 possible colors.
  18.         vid_palette() sets the working color palette, and has meaning
  19.         only in CGA mode 4 (color 320 x 200).
  20.            palette #          colors 0, 1, 2, 3
  21.               0               background, green, red, brown
  22.               1               background, cyan, magenta, white
  23.         Call vid_palette() before using the vid_wrpix() function.
  24.         In black&white 640 x 200 graphics mode, vid_border() will set
  25.         the foreground color used for the display.  The background
  26.         will always be black.
  27.  
  28.  
  29.  
  30.         EXAMPLE
  31.  
  32.            vmode(CG320);   /* set 320 color graphics mode */
  33.            vid_border(BLUE);  /* set border and graphics background color */
  34.            vid_palette(1);    /* select palette 1 */
  35.            vid_wrpix(10, 10, 2)  /* write a pixel at x10, y10, color 2,
  36.                                     which is magenta in palette 1 */
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.         This function is found in SMDLx.LIB for the Datalight Compiler.
  47.